Tray icon

The desktop application has native integration with the system tray on all operating systems.

The tray icon is enabled by default, but it can be toggled from Options → Desktop.

The tray icon has the following functionality:

Closing to system tray

This is an option which is not enabled by default and it allows a specific behavior: instead of exiting the application when the last window has been closed, the last window is instead hidden with the tray icon remaining available.

This option requires the tray icon to be enabled, otherwise it has no effect.

Automatic startup

Two options control the automatic startup functionality in Options → Startup:

Linux: custom launch command for packagers

On Linux, Launch on startup writes a trilium.desktop entry to the user's autostart directory ($XDG_CONFIG_HOME/autostart, usually ~/.config/autostart). Its Exec line points to the AppImage when running from one, or to the running executable otherwise.

Distribution packages that run Trilium on a system-wide Electron (for example electron /usr/lib/trilium/app.asar) cannot rely on the running executable, since it is the bare Electron binary, which starts without Trilium. Such packages can set the TRILIUM_LAUNCH_EXEC environment variable, typically in their wrapper script, to the full command that starts Trilium:

export TRILIUM_LAUNCH_EXEC='electron "/usr/lib/trilium/app.asar"'

The value is written to the Exec line as-is, so any paths containing spaces must already be quoted. When Start minimized to tray is enabled, --start-hidden is appended to it. TRILIUM_LAUNCH_EXEC takes precedence over both the AppImage path and the running executable.